package com.itheima.blockingqueue;

import java.util.LinkedList;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public class Demo01 {
    public static void main(String[] args) throws InterruptedException {
        LinkedBlockingQueue<String> queue = new LinkedBlockingQueue<>();
        while (true) {
            queue.put("鹿晗1");
            queue.put("鹿晗2");
            queue.put("鹿晗3");
            queue.put("鹿晗4");
            queue.put("鹿晗5");
        }
        //queue.put("鹿晗6");
       /* System.out.println(queue.take());
        System.out.println(queue.take());
        System.out.println(queue.take());
        System.out.println(queue.take());
        System.out.println(queue.take());
        System.out.println(queue.take());*/


    }

}
